package com.white.bean;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * -- 签到：签到ID、用户ID、签到时间。
 *
 * create table signIn(
 * signInId bigint primary key AUTO_INCREMENT comment "签到ID",
 * userId bigint comment "签到用户ID",
 * foreign key(userId) REFERENCES user(userId) on delete cascade on update cascade,
 * createTime TIMESTAMP not null default CURRENT_TIMESTAMP comment "签到时间，默认当前时间戳"
 * );
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SignIn {
    @TableId("signInId")
    private Long signInId;
    private Long userId;
    private String createTime;

    public SignIn(Long userId) {
        this.userId = userId;
    }
}
